<?php
session_start();
include './c/config.php';
if(isset($_GET['op'])){
	$_SESSION['openid']=$_GET['op'];
}
if (isset($_SESSION['openid'])){
	$openid='';
	if (isset($_SESSION['openid'])){
		$openid=$_SESSION['openid'];
	}
	include 'home.php';
	exit;
}
header("Content-Type:text/html;charset=UTF-8");
$redirect_uri = urlencode('http://mei94.com/shell/b.php');
$api_userinfo_base='https://open.weixin.qq.com/connect/oauth2/authorize?appid='.$appId.'&redirect_uri='.$redirect_uri.'&response_type=code&scope=snsapi_base#wechat_redirect';
header('Location: '.$api_userinfo_base);
exit;